export interface menuDataTyping {
  path: string;
  component?: string;
  key?: string;
  menu?: menuDataMenuTyping;
  routes?: menuDataRoutesTyping[];
}

export interface menuDataMenuTyping {
  name: string;
  icon?: string | undefined;
  access?: string | undefined;
  showTop?: boolean;
}

export interface menuDataRoutesTyping extends menuDataTyping {
  layout?: {
    hideNav?: boolean;
    hideMenu?: boolean;
  };
  redirect?: string;
}

const menuData: menuDataTyping[] = [
  {
    path: '/user',
    component: '@/layouts/userLayout/UserLayout.tsx',
    routes: [
      {
        path: '/user/login',
        component: '@/pages/Login/Login.tsx',
      },
    ],
  },
  {
    path: '/login',
    component: '@/pages/CompanyLogin/index.js',
    routes: [
      {
        path: '/login/index',
        component: '@/pages/CompanyLogin/ChildPages/Login.js',
      },
      {
        path: '/login/register',
        component: '@/pages/CompanyLogin/ChildPages/Register.js',
      },
      {
        path: '/login/resetPassword',
        component: '@/pages/CompanyLogin/ChildPages/ResetPassword.js',
      },
    ],
  },
  {
    path: '/',
    component: '@/layouts/mainLayout/MainLayout.tsx',
    menu: {
      name: 'mainLayout',
      access: 'mainLayout',
      showTop: false,
    },
    routes: [
      {
        path: '/dashboardIndex',
        component: '@/pages/IndexPage/IndexPage.tsx',
        menu: {
          name: '首页',
          icon: 'ScissorOutlined',
          access: 'index',
        },
      },
      {
        path: '/productManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '产品管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/productManage/productList',
            component: '@/pages/productManage/List.tsx',
            menu: {
              name: '商品列表',
              icon: 'ProfileOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
      {
        path: '/productionLineManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '产线管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/productionLineManage/productionLineList',
            component: '@/pages/productionLineManage/List.tsx',
            menu: {
              name: '产线列表',
              icon: 'ProjectOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/productionLineManage/schedulingList',
            component: '@/pages/scheduling/List.tsx',
            menu: {
              name: '排班列表',
              icon: 'ScheduleOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/productionLineManage/productionScheduling',
            component: '@/pages/productionScheduling/List.tsx',
            menu: {
              name: '排产管理',
              icon: 'ContainerOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
      {
        path: '/orderManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '订单管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/orderManage/orderManageList',
            component: '@/pages/orderManageList/List.tsx',
          },
          {
            path: '/orderManage/orderInventoList',
            component: '@/pages/orderManageList/orderInventoList/List.tsx',
          },
          {
            path: '/orderManage/orderWaitProduceList',
            component: '@/pages/orderManageList/orderWaitProduceList/List.tsx',
          },
          {
            path: '/orderManage/orderProduceingList',
            component: '@/pages/orderManageList/orderProduceingList/List.tsx',
          },
          {
            path: '/orderManage/orderProducedList',
            component: '@/pages/orderManageList/orderProducedList/List.tsx',
          },
          {
            path: '/orderManage/orderSaledsList',
            component: '@/pages/orderManageList/orderSaledsList/List.tsx',
          },
        ],
      },
      {
        path: '/toProduceManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '生产管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/toProduceManage/toProduceManageDetail',
            component: '@/pages/toProduceManageDetail/List.tsx',
            menu: {
              name: '生产详情',
              icon: 'BuildOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/toProduceManage/deviceDetail',
            component: '@/pages/deviceDetail/List.tsx',
            menu: {
              name: '设备详情',
              icon: 'OneToOneOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
      {
        path: '/procurementManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '采购管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/procurementManage/procurementManageDetail',
            component: '@/pages/procurementManageDetail/List.tsx',
            menu: {
              name: '采购详情',
              icon: 'ShoppingCartOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/procurementManage/inventoryManage',
            component: '@/pages/inventoryManage/List.tsx',
            menu: {
              name: '库存管理',
              icon: 'InboxOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/procurementManage/recipientsDetail',
            component: '@/pages/recipientsDetail/List.tsx',
            menu: {
              name: '领用详情',
              icon: 'MedicineBoxOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/procurementManage/procurementGoodsList',
            component: '@/pages/procurementGoodsList/List.tsx',
          },
          {
            path: '/procurementManage/procurementWarehousing',
            component: '@/pages/procurementWarehousing/List.tsx',
          },
          {
            path: '/procurementManage/supplierManage',
            component: '@/pages/supplierManage/List.tsx',
          },
        ],
      },
      {
        path: '/salesManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '销售管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/salesManage/salesManageDetail',
            component: '@/pages/salesManageDetail/List.tsx',
            menu: {
              name: '销售详情',
              icon: 'CrownOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
      {
        path: '/financialManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '财务管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/financialManage/balanceOfPaymentsDetail',
            component: '@/pages/balanceOfPaymentsDetail/List.tsx',
            menu: {
              name: '收支详情',
              icon: 'AccountBookOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/financialManage/bankAccountManage',
            component: '@/pages/bankAccountManage/List.tsx',
            menu: {
              name: '银行账号管理',
              icon: 'CreditCardOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
      {
        path: '/customerManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '客户管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/customerManage/customerManageList',
            component: '@/pages/customerManageList/List.tsx',
            menu: {
              name: '客户列表',
              icon: 'IdcardOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
      {
        path: '/staffManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '员工管理',
          icon: 'TeamOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/staffManage/staffManageList',
            component: '@/pages/staffManageList/List.tsx',
          },
          {
            path: '/staffManage/staffOnJobList',
            component: '@/pages/staffManageList/staffOnJobList/List.tsx',
          },
          {
            path: '/staffManage/staffWaitingOffJobList',
            component:
              '@/pages/staffManageList/staffWaitingOffJobList/List.tsx',
          },
          {
            path: '/staffManage/staffOffJobedList',
            component: '@/pages/staffManageList/staffOffJobedList/List.tsx',
          },
        ],
      },
      {
        path: '/warehouseManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '库存管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/warehouseManage/finishedWarehouse',
            component: '@/pages/finishedWarehouse/List.tsx',
          },
          {
            path: '/warehouseManage/edgematerialWarehouse',
            component: '@/pages/edgematerialWarehouse/List.tsx',
          },
        ],
      },
      {
        path: '/systemManage',
        component: '@/layouts/childSiderMenuLayout/ChildSiderMenuLayout.tsx',
        menu: {
          name: '系统管理',
          icon: 'ScissorOutlined',
          access: 'index',
        },
        routes: [
          {
            path: '/systemManage/userManageList',
            component: '@/pages/userManageList/List.tsx',
            menu: {
              name: '用户管理',
              icon: 'UserOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/systemManage/userInfoManage',
            component: '@/pages/userInfoManage/Index.tsx',
            menu: {
              name: '个人信息管理',
              icon: 'SolutionOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/systemManage/upgradeFileManage',
            component: '@/pages/upgradeFileManage/List.tsx',
            menu: {
              name: '升级文件管理',
              icon: 'FileProtectOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
          {
            path: '/systemManage/logManage',
            component: '@/pages/logManage/List.tsx',
            menu: {
              name: '日志管理',
              icon: 'CodeOutlined',
              access: 'canWelcome',
            },
            layout: {
              hideNav: false,
              hideMenu: false,
            },
          },
        ],
      },
    ],
  },
];
export default menuData;
